package com.kalvan.remoteserver.iface;

import com.kalvan.remoteserver.bean.req.LogDto;
import com.kalvan.remoteserver.bean.res.DictDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

import java.util.Map;

/**
 * @author chenliang
 */
@Api(tags = "框架基础服务")
public interface IBaseRemote {
    /**
     * 获取字典
     *
     * @param dictType 字典类型
     * @return Map<dictType, DictObject>
     */
    @ApiOperation(value = "获取基础字典", notes = "获取s_dict表字典数据")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "dictType", value = "字典类型", example = "log_type", required = true)
    })
    Map<String, DictDto> getDictMap(String dictType);

    /**
     * 写入日志
     *
     * @param log 待记录日志信息
     * @return true or false
     */
    @ApiOperation(value = "插入日志", notes = "插入s_log表")
    void insertLog(LogDto log);
}
